// Window
// (c) jimon game studio

#ifndef JEH_IWINDOW
#define JEH_IWINDOW

#include "Config_Engine.h"
#include "jeUnknown.h"
#include "jeStl.h"
#include "IMouseDriver.h"
#include "IKeyDriver.h"

namespace je
{
	namespace device
	{
		//! Window Api Pointer Type
		enum WindowApiPointerType
		{
			//! X Device
			WAPT_X_DEVICE,

			//! X Window
			WAPT_X_WINDOW,

			//! X Visual Info
			WAPT_X_VISUAL_INFO,

			//! X Frame Buffer Config
			WAPT_X_FRAMEBUFFER_CONFIG
		};

		//! Window interface
		class IWindow:public je::jeUnknown
		{
		public:
			//! Destructor
			virtual ~IWindow()
			{
			}

			//! Set Size
			virtual void SetSize(const jeVector2di & NewSize) = 0;

			//! Get Size
			virtual const jeVector2di & GetSize() = 0;

			//! Set Window Position
			virtual void SetPosition(const jeVector2di & NewPosition) = 0;

			//! Get Window Position
			virtual const jeVector2di & GetPosition() = 0;

			//! Set Fullscreen Mode
			virtual void SetFullScreen(u1 FullScreen,const jeVector2di & NewSize,s32 Depth = 0,s32 Hertz = 0) = 0;

			//! Return true if fullscreen
			virtual u1 IsFullScreen() = 0;

			//! Get Depth
			virtual s32 GetDepth() = 0;

			//! Get Hertz
			virtual s32 GetHertz() = 0;

			//! Get MSAA
			virtual s32 GetMSAA() = 0;

			//! Set Window Title
			virtual void SetTitle(const jeStringd & Title) = 0;

			//! Get Window Title
			virtual jeStringd GetTitle() = 0;

			//! Set Main Window
			//! If someone close main window - he closed engine app
			virtual void SetMainWindow(u1 Main) = 0;

			//! Return Main Window flag
			virtual u1 IsMainWindow() = 0;

			//! Return true if someone try to close window
			virtual u1 IsNeedToClose() = 0;

			//! Return true if window active
			virtual u1 IsActive() = 0;

			//! Set Focus on window
			virtual void SetWindowFocus() = 0;

			//! Get Mouse Driver
			virtual input::IMouseDriver * GetMouseDriver() = 0;

			//! Get Key Driver
			virtual input::IKeyDriver * GetKeyDriver() = 0;

			//! Get Window Api Pointer
			virtual void * GetWindowApiPointer(WindowApiPointerType Type) = 0;
		};
	}
}

#endif
